import Vue from "vue";
import VueRouter from "vue-router";
import ActivateList from "../views/ActiveList.vue";
import RankList from "../views/RankList.vue";
import Income from "../views/Income.vue";
import Incomes from "../views/Incomes.vue";
import Login from "../views/Login.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/activatelist",
  },
  {
    path: "/activatelist",
    name: "ActivateList",
    component: ActivateList,
  },
  {
    path: "/ranklist/:id",
    name: "RankList",
    component: RankList,
  },
  {
    path: "/income/:id",
    name: "Income",
    component: Income,
  },
  {
    path: "/incomes/:id",
    name: "Incomes",
    component: Incomes,
  },
  {
    path: "/login",
    name: "Login",
    component: Login,
  },
];

const router = new VueRouter({
  // mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
